import { message } from '../index.js'
const { dingding, mail } = message;
import test from 'ava'

test('message', t => {
  t.pass('message tested success')
})
// test('dingding', async t => {
  
//   let token = 'secret in dingtalk';
//   let rs;
//   try {
//     rs = await dingding(token, null, '测试', '测试');
//   } catch (err) {
//     console.log(err);
//   }
//   t.is(rs, true);
// });

// test('mail', async t => {
//   t.timeout(30 * 1000)
//   let from = 'from@from.com'
//   let to = 'to@to.com'
//   let pass = 'email pass'
//   let rst = await mail('smtp.qq.com', 465, from, pass, [to], '测试', '测试内容')
//   t.pass('success');
// })